﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

namespace Kopain2
{

    /// <summary>
    /// Interaction logic for FormTest3.xaml
    /// </summary>
    public partial class FormTest3 : Window
    {

        private static ObservableCollection<AnimalCategory> _animalCategories = new ObservableCollection<AnimalCategory>();

        public static ObservableCollection<AnimalCategory> AnimalCategories { get { return _animalCategories; } }

        public FormTest3()
        {
            InitializeComponent();

            ObservableCollection<Animal> animals = new ObservableCollection<Animal>();

            animals.Add(new Animal("California Newt"));
            animals.Add(new Animal("Tomato Frog"));
            animals.Add(new Animal("Green Tree Frog"));
            _animalCategories.Add(new AnimalCategory("Amphibians", animals));

            animals = new ObservableCollection<Animal>();
            animals.Add(new Animal("Golden Silk Spider"));
            animals.Add(new Animal("Black Widow Spider"));
            _animalCategories.Add(new AnimalCategory("Spiders", animals));

            _animalCategories[0].AnimalCategories.Add(new AnimalCategory("Kraldjur", new ObservableCollection<Animal>()));
            _animalCategories[0].AnimalCategories[0].Animals.Add(new Animal("Groda"));

            _animalCategories[0].AnimalCategories[0].AnimalCategories.Add(new AnimalCategory("Groddjur", new ObservableCollection<Animal>()));
        }
    }
}
